﻿using System.Web.Mvc;
using WebGridExDemo.Models;

namespace WebGridExDemo.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/

        public ActionResult Index()
        {
            var model = new IndexViewModel
                            {
                                Contacts = new[] {
                                    new ContactViewModel
                                        {
                                        FirstName = "John",
                                        LastName = "Doe"
                                    },
                                    new ContactViewModel
                                        {
                                        FirstName = "Jane",
                                        LastName = "Doe"
                                    }
                                                 }
                            };
            return View(model);
        }

    }
}
